﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Slider.aspx.cs" Inherits="Slider" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <script type="text/javascript">
        $(function () {
            var MinVal = $("#txtMinamount").val();
            var MaxVal = $("#txtMaxamount").val();
            $("#slider-range").slider({ range: true, min: parseInt(MinVal), max: parseInt(MaxVal),
                slide: function (event, ui) { $("#txtMinamount").val(ui.values[0]); $("#txtMaxamount").val(ui.values[1]); },
                change: function () { __doPostBack("#grdview"); }
            });
        });        
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="scrm" runat="server"></asp:ScriptManager>
    <p>
        <asp:Label ID="lblamount" runat="server">Salary range:</asp:Label>
        <asp:TextBox ID="txtMinamount" runat="server" Style="border: 0; color: #f6931f; font-weight: bold;"
            AutoPostBack="True" OnTextChanged="txtMinamount_TextChanged" />
        <asp:TextBox ID="txtMaxamount" runat="server" Style="border: 0; color: #f6931f; font-weight: bold;"
            AutoPostBack="True" OnTextChanged="txtMaxamount_TextChanged" />
    </p>
    <asp:Panel ID="pnlview" runat="server">
        <div id="slider-range" style="width: 20%;">
        </div>
    </asp:Panel>
    <div style="margin-top: 10px;">
        <asp:UpdatePanel ID="update" runat="server">
            <ContentTemplate>
                <asp:GridView ID="grdview" runat="server" AutoGenerateColumns="false">
                    <Columns>
                        <asp:TemplateField HeaderText="S.no">
                            <ItemTemplate>
                                <%#Container.DataItemIndex + 1 %></ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Salary">
                            <ItemTemplate>
                                <asp:Label ID="lblsalary" runat="server" Text='<%#Bind("salary")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div>
        <asp:GridView ID="grddummy" runat="server" AutoGenerateColumns="false">
           <Columns>
            <asp:TemplateField>
                <ItemTemplate>                    
                    <asp:CheckBox ID="chk" runat="server" Checked='<%#Bind("TStatus")%>' />
                    <AjaxControl:ModalPopupExtender ID="MPE" runat="server" PopupControlID="pnlview1" CancelControlID="btncancel" TargetControlID="chk">
                    </AjaxControl:ModalPopupExtender>                    
                </ItemTemplate>
            </asp:TemplateField>
           </Columns>          
        </asp:GridView>
        
        <asp:Panel ID="pnlview1" runat="server">
            <table width="100%" border="1">
                <tr>
                    <td>
                        <asp:Button ID="btncancel" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;Hello Friend's kjlwejf</td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
